majority element google coding interview